Skip to content

chore: update pyproject.toml to tool-agnostic standard - #1984

Merged
mentonin merged 4 commits into
kernelci:mainfrom
profusion:georg/chore/pyproject
Jul 31, 2026
Merged

chore: update pyproject.toml to tool-agnostic standard#1984
mentonin merged 4 commits into
kernelci:mainfrom
profusion:georg/chore/pyproject

Conversation

@mentonin

Copy link
Copy Markdown
Contributor

Uses the PEP621-defined pyproject.toml format. This is a tool-agnostic, poetry-compatible (since version 2) format. Advantages include better compatibility with other tools and no lock-in to poetry. poetry (through Poetry.lock) are still the sources of truth for versions we deploy/test against

@mentonin
mentonin force-pushed the georg/chore/pyproject branch from 18768a9 to 4304dc1 Compare July 10, 2026 14:40
Comment thread backend/pyproject.toml Outdated

[build-system]
requires = ["poetry-core"]
requires = ["poetry-core>=1.0.0"]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldnt we go for poetry-core>=2.0?
it seems they implemented some of the pep621 tags only at that version (project for instance)
https://python-poetry.org/blog/announcing-poetry-2.0.0

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I set it to 2.4.0 instead as that is what we are using, and version 2.2 would be needed for [dependency-groups] table support anyway. In truth, the [build-system] table is not strictly necessary (we are not packaging the project), but it makes our project clearer and supports installation with pip/setup-tools if that is wanted for any reason.

Comment thread backend/pyproject.toml
Comment thread backend/pyproject.toml
version = "0.1.0"
description = "Django Backend"
authors = ["Your Name <you@example.com>"]
requires-python = ">=3.12,<4"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be a problem.
There is some dependency failing for python 3.14 that has not been addressed yet.

  - Installing rpds-py (0.23.1): Failed

Which seems to be a problem with pyo3 ffi module.
So, it might be safer to not allow newer python versions until we fix it.

@mentonin mentonin Jul 18, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is a dependencies issue, really;

rpds-py supports python 3.14 starting in version 0.25.0 (we have 0.23.1 in lock-file). We depend on it through jsonschema, which is required by drf-spectacular and kcidb-io. jsonschema requires rpds-py>=0.25.0 as of version 4.26.0, so we actually should require versions of drf-spectacular and kcidb-io which in turn require jsonschema>=4.26.0.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so we set requires-python = ">=3.12,<3.14" and open a new issue to fix the deps?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so we set requires-python = ">=3.12,<3.14" and open a new issue to fix the deps?

Actually, the last commit in this PR already addresses that

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mentonin Tried it here, but unfortunately it still failed to install dependencies on the python3.14 even after the bump.

Package operations: 1 install, 0 updates, 0 removals                                                                                                                                                                                                                                                                           
                                                                                                                                                                                                                                                                                                                               
  - Installing rpds-py (0.23.1): Failed                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                               
PEP517 build of a dependency failed                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                               
Backend subprocess exited when trying to invoke build_wheel   

We can compare our environments and check if there is still some mismatch we need to address.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alanpeixinho I somehow did not commit the poetry lock update for rpds.py; just force-pushed the correct poetry lock

Comment thread backend/pyproject.toml
@mentonin
mentonin requested a review from alanpeixinho July 19, 2026 22:45

@alanpeixinho alanpeixinho left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mentonin
mentonin requested a review from felipebergamin July 27, 2026 22:24
mentonin added 2 commits July 31, 2026 10:51
Signed-off-by: Luiz Georg <luiz.georg@profusion.mobi>
The wrong path used to work because poetry 1.8.3 silently ignored a missing path.

Signed-off-by: Luiz Georg <luiz.georg@profusion.mobi>
@mentonin
mentonin force-pushed the georg/chore/pyproject branch from f056c31 to e7c84f8 Compare July 31, 2026 13:52
mentonin added 2 commits July 31, 2026 18:18
Signed-off-by: Luiz Georg <luiz.georg@profusion.mobi>
Signed-off-by: Luiz Georg <luiz.georg@profusion.mobi>
@mentonin
mentonin force-pushed the georg/chore/pyproject branch from 1b83ac9 to bfdd763 Compare July 31, 2026 21:23
@mentonin
mentonin added this pull request to the merge queue Jul 31, 2026
Merged via the queue into kernelci:main with commit e584e24 Jul 31, 2026
7 checks passed
@mentonin
mentonin deleted the georg/chore/pyproject branch July 31, 2026 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants